package com.example.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.dao.StationDao;
import com.example.domain.Station;

@Service
public class StationService implements com.example.service.StationService {

	@Autowired
	private StationDao stationDao;
	
	@Override
	public List<Station> getStationsByLine(Integer lineId) {
		return stationDao.findByLineId(lineId);
	}

	@Override
	public List<Station> getStationInfoByStationName(String stationName) {
		return stationDao.findByStationName(stationName);
	}

	@Override
	public void insert(Station station) {
		stationDao.insert(station);
	}

}
